package com.roin.learn.activiti.entity;

import com.roin.learn.activiti.base.BaseEntity;

import java.util.Date;

/**
 * 由于流程引擎的Task转成json会报错，所以这里自定义一个任务实体类
 */
public class PersonalTask extends BaseEntity {
    protected String id;
    protected int revision;

    protected String owner;
    protected String assignee;
    protected String initialAssignee;

    protected String parentTaskId;

    protected String name;
    protected String localizedName;
    protected String description;
    protected String localizedDescription;
    protected int priority;
    protected Date createTime; // The time when the task has been created
    protected Date dueDate;
    protected int suspensionState;
    protected String category;

    protected boolean isIdentityLinksInitialized = false;

    protected String executionId;

    protected String processInstanceId;

    protected String processDefinitionId;

    protected String taskDefinitionKey;
    protected String formKey;

    protected boolean isDeleted;

    protected String eventName;

    protected String tenantId;

    protected boolean forcedUpdate;

    public PersonalTask() {
    }

    public PersonalTask(String id, int revision, String owner, String assignee, String initialAssignee, String parentTaskId, String name, String localizedName, String description, String localizedDescription, int priority, Date createTime, Date dueDate, int suspensionState, String category, boolean isIdentityLinksInitialized, String executionId, String processInstanceId, String processDefinitionId, String taskDefinitionKey, String formKey, boolean isDeleted, String eventName, String tenantId, boolean forcedUpdate) {
        this.id = id;
        this.revision = revision;
        this.owner = owner;
        this.assignee = assignee;
        this.initialAssignee = initialAssignee;
        this.parentTaskId = parentTaskId;
        this.name = name;
        this.localizedName = localizedName;
        this.description = description;
        this.localizedDescription = localizedDescription;
        this.priority = priority;
        this.createTime = createTime;
        this.dueDate = dueDate;
        this.suspensionState = suspensionState;
        this.category = category;
        this.isIdentityLinksInitialized = isIdentityLinksInitialized;
        this.executionId = executionId;
        this.processInstanceId = processInstanceId;
        this.processDefinitionId = processDefinitionId;
        this.taskDefinitionKey = taskDefinitionKey;
        this.formKey = formKey;
        this.isDeleted = isDeleted;
        this.eventName = eventName;
        this.tenantId = tenantId;
        this.forcedUpdate = forcedUpdate;
    }

    public int getRevision() {
        return revision;
    }

    public void setRevision(int revision) {
        this.revision = revision;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public String getAssignee() {
        return assignee;
    }

    public void setAssignee(String assignee) {
        this.assignee = assignee;
    }

    public String getInitialAssignee() {
        return initialAssignee;
    }

    public void setInitialAssignee(String initialAssignee) {
        this.initialAssignee = initialAssignee;
    }

    public String getParentTaskId() {
        return parentTaskId;
    }

    public void setParentTaskId(String parentTaskId) {
        this.parentTaskId = parentTaskId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLocalizedName() {
        return localizedName;
    }

    public void setLocalizedName(String localizedName) {
        this.localizedName = localizedName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getLocalizedDescription() {
        return localizedDescription;
    }

    public void setLocalizedDescription(String localizedDescription) {
        this.localizedDescription = localizedDescription;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getDueDate() {
        return dueDate;
    }

    public void setDueDate(Date dueDate) {
        this.dueDate = dueDate;
    }

    public int getSuspensionState() {
        return suspensionState;
    }

    public void setSuspensionState(int suspensionState) {
        this.suspensionState = suspensionState;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public boolean isIdentityLinksInitialized() {
        return isIdentityLinksInitialized;
    }

    public void setIdentityLinksInitialized(boolean identityLinksInitialized) {
        isIdentityLinksInitialized = identityLinksInitialized;
    }

    public String getExecutionId() {
        return executionId;
    }

    public void setExecutionId(String executionId) {
        this.executionId = executionId;
    }

    public String getProcessInstanceId() {
        return processInstanceId;
    }

    public void setProcessInstanceId(String processInstanceId) {
        this.processInstanceId = processInstanceId;
    }

    public String getProcessDefinitionId() {
        return processDefinitionId;
    }

    public void setProcessDefinitionId(String processDefinitionId) {
        this.processDefinitionId = processDefinitionId;
    }

    public String getTaskDefinitionKey() {
        return taskDefinitionKey;
    }

    public void setTaskDefinitionKey(String taskDefinitionKey) {
        this.taskDefinitionKey = taskDefinitionKey;
    }

    public String getFormKey() {
        return formKey;
    }

    public void setFormKey(String formKey) {
        this.formKey = formKey;
    }

    public boolean isDeleted() {
        return isDeleted;
    }

    public void setDeleted(boolean deleted) {
        isDeleted = deleted;
    }

    public String getEventName() {
        return eventName;
    }

    public void setEventName(String eventName) {
        this.eventName = eventName;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public boolean isForcedUpdate() {
        return forcedUpdate;
    }

    public void setForcedUpdate(boolean forcedUpdate) {
        this.forcedUpdate = forcedUpdate;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
}
